
// 云函数入口文件
const cloud = require('../getBookList/node_modules/wx-server-sdk')

cloud.init({
  env:cloud.DYNAMIC_CURRENT_ENV
})

// 云函数入口函数
exports.main = async event => {
  const db = cloud.database()
  const userInfo = db.collection('userInfo')
  const newData = await userInfo.doc(event.userId).get()
  return {
    newData
  }
}
